package com.bristua.mall.user.controller;

import com.bristua.mall.common.bean.Result;
import com.bristua.mall.common.utils.HandleResultUtil;
import com.bristua.mall.user.biz.UserChargeVipBiz;
import com.bristua.mall.user.enums.UserCode;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * Created by Administrator on 2019/5/14.
 */
@RestController
@Api(value="VIP充值",tags={"VIP充值"})
public class UserChargeVipController {

    @Autowired
    private UserChargeVipBiz chargeVipBiz;

    @ApiOperation(value="VIP充值")
    @PostMapping(value = "/api/user/charge/vip/{chargeType}")
    public Result userChargeVip(@PathVariable(value = "chargeType") String chargeType){
        return HandleResultUtil.dataResult(UserCode.USER_CHARGE_SEND_ORDER_SUCCESS.getCode(), UserCode.USER_CHARGE_SEND_ORDER_SUCCESS.getMsg(),chargeVipBiz.userChargeVip(chargeType));
    }
}
